#@Author: bjy @Date: 2019/4/20 15:11 @Version 1.0#
<template>
      <el-table :data="tableDataList" highlight-current-row @current-change="handleTableChange" ref="singleTable"
                border style="width: 98%;margin:0 1%" height="600"
                v-loading="loadingBoolean"
                element-loading-text="拼命加载中"
                element-loading-spinner="el-icon-loading"
                >
        <el-table-column prop="real_name" sortable label="活动发起支部" width="180"></el-table-column>
        <el-table-column prop="activitytitle" sortable label="活动名称" width="180"></el-table-column>
        <el-table-column prop="categoryintegral" sortable label="活动签到积分"></el-table-column>
        <el-table-column prop="activitystarttime" sortable label="活动开始时间"></el-table-column>
        <el-table-column prop="activityendtime" sortable label="活动结束时间"></el-table-column>
        <el-table-column prop="activitysitename" label="活动地点"></el-table-column>
        <el-table-column prop="activitynumber" sortable label="面向人数"></el-table-column>
        <el-table-column prop="categoryname" label="活动类型"
                         :filters="[{ text: '主题党员日', value: '主题党员日' }, { text: '志愿者活动', value: '志愿者活动' }]"
                         :filter-method="filterCategoryName" filter-placement="bottom-end">
        </el-table-column>
        <el-table-column
          prop="activitystatus"
          label="活动状态"
          :filters="[{ text: '待审核', value: '待审核' }, { text: '审核通过', value: '审核通过' }]"
          :filter-method="filterTag"
          filter-placement="bottom-end">
          <template slot-scope="scope">
            <el-tag
              :type="scope.row.activitystatus === '待审核' ? 'primary' : 'success'"
              disable-transitions>{{scope.row.activitystatus}}</el-tag>
          </template>
        </el-table-column>
      </el-table>
</template>

<script>
    //  此处导入组件,格式,例如:import xxx名称 from "路径"
    export default{
        // 这里是name,记得填写
        name: 'ActivityListSub',
        // 子组件接收属性
        props: ['tableDataList','loadingBoolean'],
        //  数据定义
        data () {
            return {
            }
        },
        // 页面方法
        methods: {
          filterCategoryName(value, row){
            return row.categoryname === value;
          },
          filterTag(value, row) {
            return row.activitystatus === value;
          },
          handleTableChange(e){
            this.$emit('changeData',e)
          },
        },
        // 计算属性
        computed: {},
        // 侦听器
        watch: {},
        // 依赖注入
        components: {}
    }
</script>

<!-- 本地样式 -->
<style>
</style>
